<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>更新员工</title>
    <link href="dist/css/bootstrap.css" rel="stylesheet">
	<link rel="stylesheet" type="text/css" href="css/emp.css"/>
  </head>
  <body>
	
	
	<div class="container">
		
		<div class="row">
			<h1 class="text-center">更新员工</h1>
			<div class="col-lg-3">
			</div>
			<div class="col-lg-6">
				<form class="form-horizontal" action="EmployeeUpdateServlet" method="post">
					<input type="hidden" id="empId" name="empId" value="${employee.empId }"/>
				  <div class="form-group">
				    <label for="empName" class="col-sm-2 control-label">员工姓名</label>
				    <div class="col-sm-10">
				      <input type="text" class="form-control" id="empName" name="empName" value="${employee.empName }" placeholder="员工姓名">
				    </div>
				  </div>
				  <div class="form-group">
				    <label for="email" class="col-sm-2 control-label">邮箱</label>
				    <div class="col-sm-10">
				      <input type="email" class="form-control" id="email" name="email" value="${employee.email }" placeholder="邮箱">
				    </div>
				  </div>
				  <div class="form-group">
				    <label for="phone" class="col-sm-2 control-label">手机号</label>
				    <div class="col-sm-10">
				      <input type="text" class="form-control" id="phone" name="phone" value="${employee.phone }" placeholder="手机号">
				    </div>
				  </div>
				  
				  <div class="form-group">
				    <label for="deptId" class="col-sm-2 control-label">部门</label>
				    <div class="col-sm-10">
				      <select class="form-control" name="deptId">
				       <c:forEach items="${deptList }" var="deptList"> 
				        <option <c:if test="${employee.deptId==deptList.deptId }">selected</c:if> value="${deptList.deptId }">${deptList.deptName }</option>
				    	</c:forEach>
				      </select>
				    </div>
				  </div>
				  <div class="form-group">
				    <label for="gender" class="col-sm-2 control-label">性别</label>
				    <div class="col-sm-10">
				      <label class="radio-inline">
				        <input type="radio" <c:if test="${employee.gender==1 }">checked</c:if> name="gender" id="gender_man" value="1">男
				      </label>
				      <label class="radio-inline">
				        <input type="radio" <c:if test="${employee.gender==0 }">checked</c:if> name="gender" id="gender_woman" value="0">女
				      </label>
				    </div>
				  </div>
				  
				  <div class="form-group">
				    <label for="hireDate" class="col-sm-2 control-label">入职时间</label>
				    <div class="col-sm-10">
				      <input type="text" class="form-control" id="hireDate" name="hireDate" value="${employee.hireDate }" placeholder="入职时间">
				    </div>
				  </div>
				  
				  
				  <div class="form-group">
				    <div class="col-sm-offset-2 col-sm-10">
				      <button type="submit" class="btn btn-default">更新员工</button>
				    </div>
				  </div>
				</form>
			</div>
			<div class="col-lg-3">
			</div>
		</div>
		
	</div>

    <!-- jQuery (Bootstrap 的所有 JavaScript 插件都依赖 jQuery，所以必须放在前边) -->
    <script src="js/jquery.js"></script>
    <!-- 加载 Bootstrap 的所有 JavaScript 插件。你也可以根据需要只加载单个插件。 -->
    <script src="dist/js/bootstrap.js"></script>
  </body>
</html>